import com.google.common.collect.Lists;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import java.util.List;

/**
 * @author ZhangLin
 * @date 2018/6/10 11:47
 */
public class PermutationT {

    @Test
    @DisplayName("排列组合")
    void pac() {
        Permutation compare = new Permutation();
        List<String> testlist = Lists.newArrayList("1","2","3","4","5");
        List<List<String>> allList = Lists.newArrayList();
        compare.pac(testlist, Lists.<String>newArrayList(), allList);
        for (List<String> tempList : allList) {
            for (String temp : tempList){
                System.out.printf(temp);
            }
            System.out.println();
        }
        System.out.println("总数:"+ allList.size());
    }
}
